#include <iostream>
using namespace std;

int foo (int a) {
	cout << "foo(int)" <<endl;
	return 0;
}
int foo (int a, int b) {
	cout << "foo(int, int)" << endl;
	return 0;
}
int foo (void) {
	cout << "foo(void)" << endl;
	return 0;
}
int foo (int a, float b) {
	cout << "foo(int, float)" << endl;
	return 0;
}
int main (void)
{
	foo (10);  
	foo (10, 20);
	foo ();
	//foo (10, 3.14);
	foo (10, 3.14f);
	
	//通过函数指针调用重载函数的时候, 根据函数指针的类型
	//决定调用哪个版本,而不是根据参数决定
	int (*pfoo) (int, float) = foo;
	pfoo (10, 20);
	return 0;
}
